<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
  <title>学生信息</title>
</head>
<body>
<h1>学生信息</h1>
<table border="1" width="300px" align="center">
  <tr>
    <th>学号</th>
    <th>姓名</th>
    <th>性别</th>
    <th>年龄</th>
  </tr>
  <tr th:each="stu :${student}">
    <td th:text="${stu.id}"></td>
    <td th:text="${stu.studentname}"></td>
    <td th:text="${stu.gender}"></td>
    <td th:text="${stu.age}"></td>
  </tr>
</table>
<h3>该班级有下列学生</h3>
<table border="1" align="center">
  <tr>
    <td>班级编号</td>
    <td th:text="${student.classInfo.classno}"></td>
  </tr>
  <tr>
    <td>班级名称</td>
    <td th:text="${student.classInfo.classname}"></td>
  </tr>
</table>
</body>
</html>